package com.example.demo.utils

import java.util.*

/**
 * Created with IntelliJ IDEA.
 * Author:流年的樱花逝
 * Date:2018/11/13
 * Time:15:30
 */
object GenerateRandomCode {
    /**
     * 随机生成一个6位数的验证码
     */
    fun generate(): String {
        var result = ""
        val random = Random()
        for (i in 0..5) {
           result +=random.nextInt(10)
        }
        return result
    }
}

